package com.example.haohao.myview;

import androidx.appcompat.app.AppCompatActivity;

import android.graphics.Color;
import android.os.Bundle;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.LinearLayout;
import android.widget.TextView;

import java.util.ArrayList;

public class FlowActivity extends AppCompatActivity {

    private FlowLayout myFlowLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_flow);

//
        myFlowLayout = (FlowLayout) findViewById(R.id.myFlowLayout);
        ArrayList<String> strings = new ArrayList<>();
        strings.add("hello");
        strings.add("java");
        strings.add("English");
        strings.add("Biology");
        strings.add("Physics");
        strings.add("History");
        strings.add("Chemistry");
        myFlowLayout.setData(getApplicationContext(),strings);


    }

}